package com.zzyl.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserRegisterListener  implements ApplicationListener<UserRegisterEvent> {
    @Override
    public void onApplicationEvent(UserRegisterEvent event) {
        // 当收到用户注册成功的消息的时候
        // 给用户发优惠券
        log.info("给用户发优惠券");
    }
}
